home *** CD-ROM | disk | FTP | other *** search
- Path: lyra.csx.cam.ac.uk!rdhw
- From: rdhw@cus.cam.ac.uk (Robin D.H. Walker)
- Newsgroups: comp.lang.rexx
- Subject: Re: Desktops and Objects and EA's too!
- Date: 20 Feb 1996 11:15:20 GMT
- Organization: Queens' College, U of Cambridge, UK
- Distribution: inet
- Message-ID: <4gcag8$ot5@lyra.csx.cam.ac.uk>
- References: <MpSJx8r8RcPG090yn@freenet.durham.org>
- Reply-To: rdhw@cam.ac.uk (Robin Walker)
- NNTP-Posting-Host: bootes.cus.cam.ac.uk
-
- In article <MpSJx8r8RcPG090yn@freenet.durham.org>,
- Tim Middleton <as544@torfree.net> wrote:
-
- >Can someone explain to me how Os/2's SysPutEA works. For example, here is
- >the example in rexx.inf...
- >
- >/* code */
- >type = "OS/2 Command File"
- >typeinfo = "DFFF00000100FDFF"x || d2c(length(type)) || '00'x || type
- >call SysPutEA "C:\CONFIG.SYS", "TYPE", typeinfo
- >
- >It's mostly clear to me except for all the junk in the "typeinfo" line...
- >can someone offer an explanation for that to me? Is there any resources on
- >the net that explain these things?
-
- Here's something I threw together from an OS/2 v1.2 (!) programming guide:
-
- OS/2 Extended Attributes Data Format for Rexx
-
- - by rdhw@cam.ac.uk (Robin Walker)
-
- These are the formats of the value parts required by SysGetEA() and
- SysPutEA().
-
- In the following "WORD" means two bytes assembled in Intel format, with
- LSB leading, MSB second.
-
- EAs are of various types.
- Some EA types are single-valued, some EA types are multi-valued.
- The first word of an EA identifies the type.
- The layout of the rest of the EA depends on the type, but all single
- valued EAs share the same layout.
-
- Format of a Single-Valued EAs:
-
- WORD Type of EA
- 'FFFE'x = EAT_BINARY length-preceded binary
- 'FFFD'x = EAT_ASCII length-preceded ASCII
- 'FFFB'x = EAT_BITMAP length-preceded bitmap
- 'FFFA'x = EAT_METAFILE length-preceded metafile
- 'FFF9'x = EAT_ICON length-preceded icon
- 'FFEE'x = EAT_EA length-preceded EA name
- WORD Length of byte string following.
- BYTES Data field, of length given above. No terminator chars.
-
- Format of Multi-Valued, Multi-Typed EA:
-
- WORD Type of EA
- 'FFDF'x = EAT_MVMT Multi-valued, Multi-Type
- WORD CodePage CodePage of data, zero = system default.
- WORD NumEntries Number of Single-Valued EAs following.
- SVEAs Type/Length/Data triplets as defined above, repeated
- NumEntries times.
-
- Format of Multi-Valued, Single-Typed EA:
-
- WORD Type of EA
- 'FFDE'x = EAT_MVST Multi-valued Single-Type
- WORD CodePage Codepage of data, zero = system default.
- WORD NumEntries Number of length/data pairs below.
- WORD Type of length/data pairs that follow (see Single-valued)
- [pairs
- WORD Length
- BYTES Data
- ] repeated NumEntries times.
-
- An EA type EAT_ASN1 ('FFDD'x) is also defined, the format of which I do
- not know.
-
- --
- Robin Walker (Network Admin), Queens' College, Cambridge, CB3 9ET, GB
- rdhw@cam.ac.uk IBMmail:i1006437 Tel:+44 1223 335528 Fax:+44 1223 335566
-